import request from "@/utils/request";

export const queryPageApi = (params) => {
  return request.get("/depts", { params: params });
};

export const addApi = (data) => {
  return request.post("/depts", data);
};

export const getByIdApi = (id) => {
  return request.get(`/depts/${id}`);
};

export const updateApi = (data) => {
  return request.put("/depts", data);
};

export const deleteApi = (id) => {
  return request.delete(`/depts/${id}`);
};
